﻿using J.Status.Application.Command.BookingCommand;
using J.StatusModel;
using MediatR;
using StatusService;

namespace J.Status.Application.Handler.BookingHandler
{
    public class BookingSelectHandler:IRequestHandler<BookingSelectCommand,List<BookingModel>>
    {
        private readonly IBookingService bookingService;
        public BookingSelectHandler(IBookingService bookingService)
        {
            this.bookingService = bookingService;
        }

        public async Task<List<BookingModel>> Handle(BookingSelectCommand request, CancellationToken cancellationToken)
        {
            return await bookingService.BookingShow();
        }
    }
}
